<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@ page import="java.util.*" %>
<%@ page import="inet.db.video.*" %>
<%@ page import="java.math.*" %>
<jsp:useBean id="videoCatDAO" class="inet.db.video.VideoCategoryDAO" scope="session"/>
<link href="include/style.css" rel="stylesheet" type="text/css"/>
<%
	request.setCharacterEncoding("utf-8");
	BigDecimal sCatId=null;
	String sCatName=null;
 %>
<table width="799" border="0" cellpadding="0" cellspacing="0">	
<tr>
	<td>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">  
					  <tr>
						<td height="0"></td>
					  </tr>
					  <tr>
						<td><img src="images/banner-clip.gif"></td>
					  </tr>
					  <tr>
					  	<td height="6"></td>
					  </tr>
					  <tr>
					  	<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
									  <tr>
										<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
											  <tr>
												<td width="11"><img src="images/corner-ketban1.gif"></td>
												<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
													  <tr>
														<td width="777"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
															  <tr>
																<td bgcolor="eaeaea" height="5" width="297"></td>
															  </tr>
															  <tr>
																<td height="5"></td>
															  </tr>
															</table></td>
													  </tr>
													</table>
												</td>
												<td width="11"><img src="images/corner-ketban2.gif"></td>
											  </tr>
											</table>
										</td>
									  </tr>
									  <tr>
										<td bgcolor="eaeaea"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
											  <tr>
												<td width="5">&nbsp;</td>
												<td width="10" bgcolor="#FFFFFF">&nbsp;</td>
												<td width="50%" bgcolor="#FFFFFF" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
													  <tr>
														<td>
														<table width="100%"  border="0" cellspacing="0" cellpadding="0">
															  <tr>
																<td background="images/b-inside.gif" height="22" align="center" width="110"><a href="#" class="titlenews-link">CLIP</a></td>
																<td>&nbsp;</td>
															  </tr>
															</table>
														</td>
													  </tr>
													  <tr>
														<td height="5"></td>
													  </tr>
													  <tr>
														<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                                        	<tr>
                                                        	<% 	
																	Collection cVideos=videoCatDAO.findAllRoots(1);			
																	if (cVideos != null && cVideos.size() > 0) {
											          							VideoCategory video = null;
											          							Iterator it=cVideos.iterator();
											          							int i=0;
											          							while(it.hasNext()){	
											          							 i++;
										          								 video=(VideoCategory)it.next();
										          								 if(i==1){
										          								 	sCatId=video.getId();
										          								 	sCatName=video.getName();
										          								 }							 	
                                                        	 %>
																<td width="2%" align="center"><img src="images/tamgiac-icon.gif"></td>
																<td width="13%" align="left">
																	<a target="videoName" href="video.jsp?catId=<%=video.getId() %>&catName=<%=video.getName() %>" class="bluedark-text" ><%=video.getName() %></a> 
																</td>
															<%if(it.hasNext()){
																video=(VideoCategory)it.next();	
															%>
																<td width="2%" align="center"><img src="images/tamgiac-icon.gif"></td>
																<td width="13%" align="left">
																	<a target="videoName" href="video.jsp?catId=<%=video.getId() %>&catName=<%=video.getName() %>" 
																	    class="bluedark-text"><%=video.getName() %></a> 
																</td>
															<%}else{ %>
																<td width="2%" align="center"></td>
																<td width="13%" > 
																</td>
															<%} %>
															<%if(it.hasNext()){ 
																video=(VideoCategory)it.next();
															%>
																<td width="2%" align="center"><img src="images/tamgiac-icon.gif"></td>
																<td width="13%" align="left">
																	<a target="videoName" href="video.jsp?catId=<%=video.getId() %>&catName=<%=video.getName() %>" 
																	    class="bluedark-text"><%=video.getName() %></a> 
																</td>
															<%}else{ %>
																<td width="2%" align="center"></td>
																<td width="13%" > 
																</td>
															<%}out.println("</tr><tr><td height=\"10\"></td></tr><tr>"); %>	
															<%
																	}	
										          				}	
															 %>  
															 </tr>	 
															</table>
															</td>
													  </tr>
													  <tr>
														<td height="10"></td>
													  </tr>
													</table>
                                                   
												</td>
                                                <td  bgcolor="white" valign="top">
                                                	 <table bgcolor="white" height="100%" width="100%">
                                                     	<tr>
                                                        	<td height="22">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="middle" align="center"><img src="images/cuphap-clip.gif"></td>
                                                        </tr>
                                                    </table>
                                                </td>
												<td width="10" bgcolor="#FFFFFF">&nbsp;</td>
												<td width="5">&nbsp;</td>
											  </tr>
											</table>
										</td>
									  </tr>
									  <tr>
										<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
											  <tr>
												<td width="11"><img src="images/corner-ketban4.gif"></td>
												<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
													  <tr>
														<td width="777"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
															  <tr>
																<td height="5"></td>
															  </tr>
															  <tr>
																<td bgcolor="eaeaea" height="5" width="297"></td>
															  </tr>
															</table></td>
													  </tr>
													</table>
												</td>
												<td width="11"><img src="images/corner-ketban3.gif"></td>
											  </tr>
											</table>
										</td>
									  </tr>
									</table>
						</td>
					  </tr>
					  <tr>
						<td height="6"></td>
					  </tr>
					  <tr>
						<td height="6"></td>
					  </tr>
					  <tr>
						<td>
                        <iframe name="videoName" marginheight="1" marginwidth="1" scrolling="no" src="video.jsp?catId=<%=sCatId!=null? sCatId:"" %>&catName=<%=sCatName!=null? sCatName:"" %>" frameborder="0" align="top" height="1140" width="799" id="videoIF"></iframe>
						</td>
					  </tr>
					  <tr>
						<td height="6"></td>
					  </tr>
					</table>
		</td>
	</tr>
</table>					
